void getHistogram(const Image<unsigned char> &image, vector<unsigned int> &vHist, bool cum=false)
{
    if (image.empty()) return;
      
    vHist.clear();
    vHist.resize(256);
    
    for (int y = 0; y < image.dim(1); ++y) {
            for (int x = 0; x < image.dim(0); ++x) {
                    vHist[image(x, y)]++;
            }
    }
	if(cum){
		for (unsigned int i = 1; i < vHist.size(); ++i){
            vHist[i] = vHist[i - 1] + vHist[i];
		}
	}
}

